asFlow

abstract fun asFlow(): Flow<ResultsChange<T>>

Observe changes to the RealmResult. Once subscribed the flow will emit a InitialResults event and then a UpdatedResults on any change to the objects represented by the query backing the RealmResults. The flow will continue running indefinitely except if the results are from a backlinks property, then they will stop once the target object is deleted.

The change calculations will on on the thread represented by Configuration.SharedBuilder.notificationDispatcher.

Return

a flow representing changes to the RealmResults.